#ifndef CLIENT_H
#define CLIENT_H

#include <QtWidgets/QWidget>
#include "ui_Client.h"

#include <QtNetwork>
#include <QHostAddress>
#include <QMessageBox>
#include <QDataStream>
#include <QByteArray>
#include <QDebug>
#include <QDateTime>
#include <QFile>
#include <QFileDialog>


#include <QQueue>
#include <QWidget>

namespace Ui {
class Client;
}

class Client : public QWidget
{
    Q_OBJECT

public:
    explicit Client(QWidget *parent = nullptr);

    ~Client();

signals:
    void file_path(QString path);

    void snyc_path(QString path);

private slots:
    // 与服务器断开连接
    void disconnectServer();

private:
    void UploadFile();

    Ui::Client *ui;

    QString username;

    QTimer *timer;

    QQueue<QString> file_queue;

    // 文件传送
    QString filename;

    // 系统时间
    QDateTime current_date_time;
    QString str_date_time;
};

#endif // CLIENT_H
